0ec25e2200acd773dd33a242733c429d5adc1b76
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 1"""
4  date="2023-02-10T17:04:51Z"
5  content="""
6 Not a legal url really, RFC 1738 says "If the port is omitted, the colon is as well."
7 But web browsers, curl, wget, etc do mostly seem to support it, so at least 
8 Postel's law seems to apply..
9
10 Here's the root cause of it failing:
11
12         ghci> parseRequest "https://datasets.datalad.org:/dbic/QA/.git/"
13         *** Exception: InvalidUrlException "https://datasets.datalad.org:/dbic/QA/.git/" "Invalid port"
14
15 So http-conduit refuses to parse it and so can't be used to download it.
16
17 Filed an issue, but I don't know if they'll want to change
18 http-conduit to accept a malformed url.
19 <https://github.com/snoyberg/http-client/issues/501>
20
21 Since network-uri is able to parse it, into an URI
22 that has `"uriPort = ":"`, git-annex could special 
23 case handling of the empty port there, changing it to ""
24 and so generating an url that http-conduit can parse.
25 I've implemented this fix.
26 """]]